package com.naiterui.ehp.bs.doctor.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * @Description 医生城市关系表
 * @Author gongbaoqiang
 * @Date 2020/4/10 10:38 AM
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Entity
@Table(name = "dr_city")
public class DrCity implements Serializable {

    private static final long serialVersionUID = 8358060940157591093L;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    private Long id;

    @Column(name = "doctor_id")
    private Long doctorId;

    @Column(name = "city_id")
    private Integer cityId;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 版本控制
     */
    @Version
    @Column(name = "version")
    private Integer version;}
